<?php

namespace backend\models;

use Yii;

/**
 * This is the model class for table "mall_assemble_specs".
 *
 * @property int $id
 * @property int $pid 拼团产品id
 * @property string $value 属性值
 * @property int $stock 库存
 * @property string $alone_price 单独价格
 * @property string $assemble_price 拼团价格
 * @property string $product_no 产品编号
 * @property string $img 属性图
 * @property int $create_time 创建时间
 * @property int $status
 */
class MallAssembleSpecs extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'mall_assemble_specs';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['pid', 'stock', 'alone_price', 'assemble_price', 'create_time'], 'required'],
            [['pid', 'stock', 'create_time', 'status'], 'integer'],
            [['alone_price', 'assemble_price'], 'number'],
            [['value'], 'string', 'max' => 50],
            [['product_no'], 'string', 'max' => 100],
            [['img'], 'string', 'max' => 500],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'pid' => 'Pid',
            'value' => 'Value',
            'stock' => 'Stock',
            'alone_price' => 'Alone Price',
            'assemble_price' => 'Assemble Price',
            'product_no' => 'Product No',
            'img' => 'Img',
            'create_time' => 'Create Time',
            'status' => 'Status',
        ];
    }
}
